import request from '@/utils/request';

/** 发送验证码 API*/
export function sendCodeAPI(mobile: string) {
  return request({
    url: `/v1_0/sms/codes/${mobile}`,
  });
}

/** 登录表单的类型 */
export type loginFromDataType = { mobile: string; code: string };

/** 登录API */
export function loginAPI(data: loginFromDataType) {
  return request({
    url: '/v1_0/authorizations',
    method: 'post',
    data,
  });
}
